<div class="navigation">
    {% if pages %}
    {% if previous_url %}<a href="{{ previous_url }}">{% else %}<span>{% endif %}<span class="nav-prev">«</span>{% if previous_url %}</a>{% else %}</span>{% endif %}
    {% for group in pages %}
    {% for page in group %}
    {% if page.current %}<span class="nav-center">{{ page.number }}</span>{% else %}<a href="{{ page.url }}">{{ page.number }}</a>{% endif %}
    {% endfor %}
    {% if not forloop.last %}<span>...</span>{% endif %}
    {% endfor %}
    {% if next_url %}<a href="{{ next_url }}">{% else %}<span>{% endif %}<span class="nav-next">»</span>{% if next_url %}</a>{% else %}</span>{% endif %}
    {% endif %}
</div>